package com.market.domain.activity.service.quota;

import com.market.domain.activity.model.entity.ActivityCountEntity;
import com.market.domain.activity.model.entity.ActivityEntity;
import com.market.domain.activity.model.entity.ActivitySkuEntity;
import com.market.domain.activity.repository.IActivityRepository;
import com.market.domain.activity.service.quota.rule.factory.DefaultActivityChainFactory;

//抽奖活动的支持类，给抽象类提供方法支撑(拆分职责）
public class RaffleActivityAccountQuotaSupport {

    protected IActivityRepository activityRepository;

    protected DefaultActivityChainFactory activityChainFactory;

    public RaffleActivityAccountQuotaSupport(DefaultActivityChainFactory activityChainFactory, IActivityRepository activityRepository) {
        this.activityChainFactory = activityChainFactory;
        this.activityRepository = activityRepository;
    }


    public RaffleActivityAccountQuotaSupport(IActivityRepository activityRepository) {
        this.activityRepository = activityRepository;
    }

    public ActivitySkuEntity queryActivitySku(Long sku) {
        return activityRepository.queryActivitySku(sku);
    }

    public ActivityEntity queryRaffleActivityByActivityId(Long activityId) {
        return activityRepository.queryRaffleActivityByActivityId(activityId);
    }

    public ActivityCountEntity queryRaffleActivityCountByActivityCountId(Long activityCountId) {
        return activityRepository.queryRaffleActivityCountByActivityCountId(activityCountId);
    }
}
